
package org.xteam.sled.ast;

public class SledAstPrinter extends DefaultSledVisitor {

	private java.io.PrintStream out;
	private int indentLevel;
	
	public SledAstPrinter(java.io.PrintStream out) {
		this.out = out;
		indentLevel = 0;
	}
	
	public void visitSledFile(SledFile aSledFile) {
		out.print("SledFile(");
		++indentLevel;out.println();
		printIndent();
		out.print("specs=");
		if (aSledFile.getSpecs() != null) {
			out.println("[");
			++indentLevel;
			for (Spec e : aSledFile.getSpecs()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitFieldsSpec(FieldsSpec aFieldsSpec) {
		out.print("FieldsSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("name=");
		if (aFieldsSpec.getName() != null) {
			aFieldsSpec.getName().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("size=");
		if (aFieldsSpec.getSize() != null) {
			aFieldsSpec.getSize().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("fields=");
		if (aFieldsSpec.getFields() != null) {
			out.println("[");
			++indentLevel;
			for (FieldSpec e : aFieldsSpec.getFields()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitFieldSpec(FieldSpec aFieldSpec) {
		out.print("FieldSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("name=");
		if (aFieldSpec.getName() != null) {
			aFieldSpec.getName().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("low=");
		if (aFieldSpec.getLow() != null) {
			aFieldSpec.getLow().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("high=");
		if (aFieldSpec.getHigh() != null) {
			aFieldSpec.getHigh().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitFieldInfoSpec(FieldInfoSpec aFieldInfoSpec) {
		out.print("FieldInfoSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("infos=");
		if (aFieldInfoSpec.getInfos() != null) {
			out.println("[");
			++indentLevel;
			for (FieldInfo e : aFieldInfoSpec.getInfos()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitFieldInfo(FieldInfo aFieldInfo) {
		out.print("FieldInfo(");
		++indentLevel;out.println();
		printIndent();
		out.print("idents=");
		if (aFieldInfo.getIdents() != null) {
			out.println("[");
			++indentLevel;
			for (Ident e : aFieldInfo.getIdents()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("items=");
		if (aFieldInfo.getItems() != null) {
			out.println("[");
			++indentLevel;
			for (FieldInfoItem e : aFieldInfo.getItems()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitCheckedItem(CheckedItem aCheckedItem) {
		out.print("CheckedItem(");
		out.println(")");
	}
	
	public void visitUncheckedItem(UncheckedItem aUncheckedItem) {
		out.print("UncheckedItem(");
		out.println(")");
	}
	
	public void visitGuaranteedItem(GuaranteedItem aGuaranteedItem) {
		out.print("GuaranteedItem(");
		out.println(")");
	}
	
	public void visitSparseItem(SparseItem aSparseItem) {
		out.print("SparseItem(");
		++indentLevel;out.println();
		printIndent();
		out.print("bindings=");
		if (aSparseItem.getBindings() != null) {
			out.println("[");
			++indentLevel;
			for (NameBinding e : aSparseItem.getBindings()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitNameBinding(NameBinding aNameBinding) {
		out.print("NameBinding(");
		++indentLevel;out.println();
		printIndent();
		out.print("name=");
		if (aNameBinding.getName() != null) {
			aNameBinding.getName().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("value=");
		if (aNameBinding.getValue() != null) {
			aNameBinding.getValue().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitNamesItem(NamesItem aNamesItem) {
		out.print("NamesItem(");
		++indentLevel;out.println();
		printIndent();
		out.print("names=");
		if (aNamesItem.getNames() != null) {
			out.println("[");
			++indentLevel;
			for (FieldName e : aNamesItem.getNames()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitFieldName(FieldName aFieldName) {
		out.print("FieldName(");
		out.print("value=");
		if (aFieldName.getValue() != null) {
			out.print(aFieldName.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitRelocatableSpec(RelocatableSpec aRelocatableSpec) {
		out.print("RelocatableSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("vars=");
		if (aRelocatableSpec.getVars() != null) {
			out.println("[");
			++indentLevel;
			for (Ident e : aRelocatableSpec.getVars()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitBitSpec(BitSpec aBitSpec) {
		out.print("BitSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("zeroInt=");
		if (aBitSpec.getZeroInt() != null) {
			aBitSpec.getZeroInt().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("value=");
		if (aBitSpec.getValue() != null) {
			aBitSpec.getValue().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitPatternsSpec(PatternsSpec aPatternsSpec) {
		out.print("PatternsSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("bindings=");
		if (aPatternsSpec.getBindings() != null) {
			out.println("[");
			++indentLevel;
			for (PatternBinding e : aPatternsSpec.getBindings()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitSimplePatternBinding(SimplePatternBinding aSimplePatternBinding) {
		out.print("SimplePatternBinding(");
		++indentLevel;out.println();
		printIndent();
		out.print("name=");
		if (aSimplePatternBinding.getName() != null) {
			aSimplePatternBinding.getName().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("pattern=");
		if (aSimplePatternBinding.getPattern() != null) {
			aSimplePatternBinding.getPattern().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitAnyPatternBinding(AnyPatternBinding aAnyPatternBinding) {
		out.print("AnyPatternBinding(");
		++indentLevel;out.println();
		printIndent();
		out.print("name=");
		if (aAnyPatternBinding.getName() != null) {
			aAnyPatternBinding.getName().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("names=");
		if (aAnyPatternBinding.getNames() != null) {
			out.println("[");
			++indentLevel;
			for (Ident e : aAnyPatternBinding.getNames()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("pattern=");
		if (aAnyPatternBinding.getPattern() != null) {
			aAnyPatternBinding.getPattern().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitListPatternBinding(ListPatternBinding aListPatternBinding) {
		out.print("ListPatternBinding(");
		++indentLevel;out.println();
		printIndent();
		out.print("names=");
		if (aListPatternBinding.getNames() != null) {
			out.println("[");
			++indentLevel;
			for (Ident e : aListPatternBinding.getNames()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("pattern=");
		if (aListPatternBinding.getPattern() != null) {
			aListPatternBinding.getPattern().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitOrPattern(OrPattern aOrPattern) {
		out.print("OrPattern(");
		out.println(")");
	}
	
	public void visitSequentPattern(SequentPattern aSequentPattern) {
		out.print("SequentPattern(");
		out.println(")");
	}
	
	public void visitLabelPattern(LabelPattern aLabelPattern) {
		out.print("LabelPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aLabelPattern.getIdent() != null) {
			aLabelPattern.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("expr=");
		if (aLabelPattern.getExpr() != null) {
			aLabelPattern.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitAndPattern(AndPattern aAndPattern) {
		out.print("AndPattern(");
		out.println(")");
	}
	
	public void visitPrefixPattern(PrefixPattern aPrefixPattern) {
		out.print("PrefixPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("expr=");
		if (aPrefixPattern.getExpr() != null) {
			aPrefixPattern.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitSuffixPattern(SuffixPattern aSuffixPattern) {
		out.print("SuffixPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("expr=");
		if (aSuffixPattern.getExpr() != null) {
			aSuffixPattern.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitPatternIdent(PatternIdent aPatternIdent) {
		out.print("PatternIdent(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aPatternIdent.getIdent() != null) {
			aPatternIdent.getIdent().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitRelationPattern(RelationPattern aRelationPattern) {
		out.print("RelationPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aRelationPattern.getIdent() != null) {
			aRelationPattern.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("relop=");
		if (aRelationPattern.getRelop() != null) {
			aRelationPattern.getRelop().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("expr=");
		if (aRelationPattern.getExpr() != null) {
			aRelationPattern.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitGeneratorPattern(GeneratorPattern aGeneratorPattern) {
		out.print("GeneratorPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aGeneratorPattern.getIdent() != null) {
			aGeneratorPattern.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("relop=");
		if (aGeneratorPattern.getRelop() != null) {
			aGeneratorPattern.getRelop().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("generator=");
		if (aGeneratorPattern.getGenerator() != null) {
			aGeneratorPattern.getGenerator().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitEqOp(EqOp aEqOp) {
		out.print("EqOp(");
		out.println(")");
	}
	
	public void visitNeOp(NeOp aNeOp) {
		out.print("NeOp(");
		out.println(")");
	}
	
	public void visitLeOp(LeOp aLeOp) {
		out.print("LeOp(");
		out.println(")");
	}
	
	public void visitGeOp(GeOp aGeOp) {
		out.print("GeOp(");
		out.println(")");
	}
	
	public void visitLtOp(LtOp aLtOp) {
		out.print("LtOp(");
		out.println(")");
	}
	
	public void visitGtOp(GtOp aGtOp) {
		out.print("GtOp(");
		out.println(")");
	}
	
	public void visitIdentOpName(IdentOpName aIdentOpName) {
		out.print("IdentOpName(");
		out.println(")");
	}
	
	public void visitStringOpName(StringOpName aStringOpName) {
		out.print("StringOpName(");
		out.println(")");
	}
	
	public void visitRangeGenerator(RangeGenerator aRangeGenerator) {
		out.print("RangeGenerator(");
		++indentLevel;out.println();
		printIndent();
		out.print("from=");
		if (aRangeGenerator.getFrom() != null) {
			aRangeGenerator.getFrom().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("to=");
		if (aRangeGenerator.getTo() != null) {
			aRangeGenerator.getTo().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("step=");
		if (aRangeGenerator.getStep() != null) {
			aRangeGenerator.getStep().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitListGenerator(ListGenerator aListGenerator) {
		out.print("ListGenerator(");
		++indentLevel;out.println();
		printIndent();
		out.print("values=");
		if (aListGenerator.getValues() != null) {
			out.println("[");
			++indentLevel;
			for (IntegerLiteral e : aListGenerator.getValues()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitListPattern(ListPattern aListPattern) {
		out.print("ListPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("names=");
		if (aListPattern.getNames() != null) {
			out.println("[");
			++indentLevel;
			for (Ident e : aListPattern.getNames()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitEpsilonPattern(EpsilonPattern aEpsilonPattern) {
		out.print("EpsilonPattern(");
		out.println(")");
	}
	
	public void visitSomePattern(SomePattern aSomePattern) {
		out.print("SomePattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aSomePattern.getIdent() != null) {
			aSomePattern.getIdent().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitCallPattern(CallPattern aCallPattern) {
		out.print("CallPattern(");
		++indentLevel;out.println();
		printIndent();
		out.print("opcode=");
		if (aCallPattern.getOpcode() != null) {
			out.println("[");
			++indentLevel;
			for (OpName e : aCallPattern.getOpcode()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("arguments=");
		if (aCallPattern.getArguments() != null) {
			out.println("[");
			++indentLevel;
			for (Expr e : aCallPattern.getArguments()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitAddExpr(AddExpr aAddExpr) {
		out.print("AddExpr(");
		out.println(")");
	}
	
	public void visitSubExpr(SubExpr aSubExpr) {
		out.print("SubExpr(");
		out.println(")");
	}
	
	public void visitMulExpr(MulExpr aMulExpr) {
		out.print("MulExpr(");
		out.println(")");
	}
	
	public void visitDivExpr(DivExpr aDivExpr) {
		out.print("DivExpr(");
		out.println(")");
	}
	
	public void visitMinusExpr(MinusExpr aMinusExpr) {
		out.print("MinusExpr(");
		++indentLevel;out.println();
		printIndent();
		out.print("expr=");
		if (aMinusExpr.getExpr() != null) {
			aMinusExpr.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitExtendExpr(ExtendExpr aExtendExpr) {
		out.print("ExtendExpr(");
		++indentLevel;out.println();
		printIndent();
		out.print("expr=");
		if (aExtendExpr.getExpr() != null) {
			aExtendExpr.getExpr().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitIdentExpr(IdentExpr aIdentExpr) {
		out.print("IdentExpr(");
		out.print("name=");
		if (aIdentExpr.getName() != null) {
			out.print(aIdentExpr.getName());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitBitRange(BitRange aBitRange) {
		out.print("BitRange(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aBitRange.getIdent() != null) {
			aBitRange.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("low=");
		if (aBitRange.getLow() != null) {
			aBitRange.getLow().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("high=");
		if (aBitRange.getHigh() != null) {
			aBitRange.getHigh().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitIntegerExpr(IntegerExpr aIntegerExpr) {
		out.print("IntegerExpr(");
		out.print("value=");
		if (aIntegerExpr.getValue() != null) {
			out.print(aIntegerExpr.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitStringExpr(StringExpr aStringExpr) {
		out.print("StringExpr(");
		out.print("value=");
		if (aStringExpr.getValue() != null) {
			out.print(aStringExpr.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitConstructorsSpec(ConstructorsSpec aConstructorsSpec) {
		out.print("ConstructorsSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("constructors=");
		if (aConstructorsSpec.getConstructors() != null) {
			out.println("[");
			++indentLevel;
			for (Constructor e : aConstructorsSpec.getConstructors()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitConstructor(Constructor aConstructor) {
		out.print("Constructor(");
		++indentLevel;out.println();
		printIndent();
		out.print("opnames=");
		if (aConstructor.getOpnames() != null) {
			out.println("[");
			++indentLevel;
			for (OpName e : aConstructor.getOpnames()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("operands=");
		if (aConstructor.getOperands() != null) {
			out.println("[");
			++indentLevel;
			for (Operand e : aConstructor.getOperands()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("type=");
		if (aConstructor.getType() != null) {
			aConstructor.getType().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("branches=");
		if (aConstructor.getBranches() != null) {
			out.println("[");
			++indentLevel;
			for (Branch e : aConstructor.getBranches()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitIdentOperand(IdentOperand aIdentOperand) {
		out.print("IdentOperand(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aIdentOperand.getIdent() != null) {
			aIdentOperand.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("extend=");
		if (aIdentOperand.getExtend() != null) {
			aIdentOperand.getExtend().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitExtend(Extend aExtend) {
		out.print("Extend(");
		out.println(")");
	}
	
	public void visitNoiseOperand(NoiseOperand aNoiseOperand) {
		out.print("NoiseOperand(");
		out.print("value=");
		if (aNoiseOperand.getValue() != null) {
			out.print(aNoiseOperand.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitBranch(Branch aBranch) {
		out.print("Branch(");
		++indentLevel;out.println();
		printIndent();
		out.print("equations=");
		if (aBranch.getEquations() != null) {
			out.println("[");
			++indentLevel;
			for (Equation e : aBranch.getEquations()) {
				printIndent();
				e.visit(this);
			}
			--indentLevel;
			printIndent();
			out.println("]");
		} else {
			out.println("null");
		}
		printIndent();
		out.print("pattern=");
		if (aBranch.getPattern() != null) {
			aBranch.getPattern().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitEquation(Equation aEquation) {
		out.print("Equation(");
		++indentLevel;out.println();
		printIndent();
		out.print("left=");
		if (aEquation.getLeft() != null) {
			aEquation.getLeft().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("relop=");
		if (aEquation.getRelop() != null) {
			aEquation.getRelop().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("right=");
		if (aEquation.getRight() != null) {
			aEquation.getRight().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitPlaceholderSpec(PlaceholderSpec aPlaceholderSpec) {
		out.print("PlaceholderSpec(");
		++indentLevel;out.println();
		printIndent();
		out.print("ident=");
		if (aPlaceholderSpec.getIdent() != null) {
			aPlaceholderSpec.getIdent().visit(this);
		} else {
			out.println("null");
		}
		printIndent();
		out.print("pattern=");
		if (aPlaceholderSpec.getPattern() != null) {
			aPlaceholderSpec.getPattern().visit(this);
		} else {
			out.println("null");
		}
		--indentLevel;printIndent();
		out.println(")");
	}
	
	public void visitIdent(Ident aIdent) {
		out.print("Ident(");
		out.print("name=");
		if (aIdent.getName() != null) {
			out.print(aIdent.getName());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitIntegerLiteral(IntegerLiteral aIntegerLiteral) {
		out.print("IntegerLiteral(");
		out.print("value=");
		if (aIntegerLiteral.getValue() != null) {
			out.print(aIntegerLiteral.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	public void visitStringLiteral(StringLiteral aStringLiteral) {
		out.print("StringLiteral(");
		out.print("value=");
		if (aStringLiteral.getValue() != null) {
			out.print(aStringLiteral.getValue());
		} else {
			out.print("null");
		}
		out.println(")");
	}
	
	private void printIndent() {
		for (int i = 0; i < indentLevel; ++i) {
			out.print("  ");
		}
	}
}
